package org.springblade.pm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.core.tool.api.R;
import org.springblade.pm.entity.Plan;
import org.springblade.pm.entity.PlanDetails;
import org.springblade.pm.entity.PlanMilestone;

public interface IPlanService extends IService<Plan> {
	/**
	 * 根据项目id和版本号获取计划
	 * @param projectId
	 * @param version
	 * @return
	 */
	Plan selectPlan(Integer projectId,String version);
	/**
	 * 根据pid和sort获取计划详情
	 */
	PlanDetails selectPlanDetails(Integer pid,Integer sort);

	/**
	 * 新增或修改计划详情
	 * @param planDetails
	 * @return
	 */
	Integer savePlanDetails(PlanDetails planDetails);

	/**
	 * 新增或修改计划里程碑
	 * @param planMilestone
	 * @return
	 */
	Integer savePlanMilestone(PlanMilestone planMilestone);

	/**
	 * 根据id获取计划详情或者里程碑数据
	 * @param id
	 * @param sort
	 * @return
	 */
	R getplanDetail(Integer id, String sort);

	/**
	 * 根据id删除整个相关计划
	 * @param
	 * @return
	 */
	void deletePlan(Integer id);
}
